<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * @category   Hamania
 * @package    Hamania_CashOnDelivery
 * @copyright  Copyright (c) 2010 Hamania Medien GmbH & Co. KG (http://www.phoenix-medien.de)
 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 */
?>
<p>
    <?php echo $this->getMethod()->getTitle() ?><br />
    <?php if ($this->getMethod()->getCustomText()): ?>
        <?php echo $this->getMethod()->getCustomText() ?><br />
    <?php endif; ?>
    <?php       
        $_extra_fee_excl = $this->getCodFeeExclTax();
        $_extra_fee_incl = $this->getCodFeeInclTax();
        if (!is_null($_extra_fee_excl)):
            if ($this->helper('cashondelivery')->displayCodFeeIncludingTax()){
                $_codFeeStr = $_extra_fee_incl;
            }else{
                $_codFeeStr = $_extra_fee_excl;
                if ($this->helper('cashondelivery')->displayCodBothPrices() && ($_extra_fee_incl != $_extra_fee_excl)) {
                    $_codFeeStr .= ' ('.$this->__('Incl. Tax').' '.$_extra_fee_incl.')';
                }
            }
        ?>
        <?php if((float)$this->getRawCodFee() || Mage::getStoreConfig('payment/cashondelivery/display_zero_fee')): ?>
        <div>
        <?php echo $this->__('Cash on Delivery fee %s', $_codFeeStr) ?>
        </div>
        <?php endif; ?>
    <?php endif; ?>
</p>
